package io.cloud.tec.ant_design_vue_pro.biz;

import io.cloud.tec.ant_design_vue_pro.dao.AccountLoginInfoMapper;
import io.cloud.tec.ant_design_vue_pro.entity.AccountLoginInfo;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Slf4j
@Service
@AllArgsConstructor
public class AccountLoginInfoInsertService {

    AccountLoginInfoMapper mapper;

    @Transactional
    public void insertOnlyPK(Integer id) {
        AccountLoginInfo insertData = new AccountLoginInfo();
        insertData.setId(id);
        Integer newId = mapper.insertOnlyPK(insertData);
        log.info("新插入的ID为{}", newId);
        if (id == 4) {
            int i = 1 / 0;
        }
    }
}
